﻿@{
    ViewBag.Title = "FitemSearchModel";
} 
<!--物料搜索弹出视图	-->
@{
    Layout = null;
}

<!DOCTYPE html>
<head>
    <title>fitem查询</title> 
    <link href="~/Scripts/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-easyui/jquery.min.js"></script>
    <script src="~/Scripts/jquery-easyui/jquery.easyui.min.js"></script>
    <script src="~/Scripts/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
    <script src="~/Content/js/common.js"></script>
    <link href="~/Content/themes/table.css" rel="stylesheet" /> 
 </head>
<html>
<body>
    <script type="text/javascript">
        //表格列定义FItemID,FstandardCost,FstandardManHour,FName,FModel,FOrderPrice
        var myColumsfitem = [[
                     { width: 80, title: '物料编码', field: 'FItemID', hidden: false },
                        { width: 120, title: '物料名称', field: 'FName', hidden: false },
                       { width: 120, title: '规格型号', field: 'FModel', hidden: false },
                       { width: 80, title: '标准成本', field: 'FstandardCost', hidden: false },
                       { width: 80, title: '标准工时', field: 'FstandardManHour', hidden: false },
                        { width: 80, title: '订单价格', field: 'FOrderPrice', hidden: false },

    ]];
 

        $(function () {
  
    });
 

    //搜索任务单
    function ui_fitem_searchdata() { 
     
        $("#ui_fitem_dg").datagrid({       //初始化datagrid
            url: "/Bom/getFitemStandard",
            striped: true, rownumbers: true, pagination: true, pageSize: 20, singleSelect: true, multiSort: false,
            queryParams: {
                FName: $('#FitemName').val(),
                FModel: $('#FitemModel').val(),
                fbominterid: $('#fbominterid').val()
            },
            pageList: [20, 40, 60, 80, 100],
            columns: myColumsfitem,
            onDblClickRow: function (index, row) { }
        });
        $("#ui_fitem_dg").datagrid('clearSelections').datagrid('clearChecked');
    }
    //清除搜索条件
    function ui_fitem_cleardata() {
        $('#ui_fitem_search input').val('');
        //$("#ui_fitem_dg").datagrid('load', {});
        $("#ui_fitem_dg").datagrid('clearSelections').datagrid('clearChecked');
    }

    </script> 
    <div id="ui_fitem_layout" class="easyui-layout" data-options="fit:true,border:false" style=" height:220px;">
        <div data-options="region:'north',split:true,border:true,collapsed:false" title="条件搜索" style="height:120px;">
            <div id="ui_fitem_search">
                <table class="tableForm" style="width: 99%; height: 100%; background: #F5F5F5;">
                    <tr>

                        <th>
                            物料名称：
                        </th>
                        <td>
                            <input name="FitemName" id="FitemName" class="easyui-validatebox textbox" style="width:150px;height:22px;" />
                        </td>
                        <th>
                            规格型号：
                        </th>
                        <td>
                            <input name="FitemModel" id="FitemModel" class="easyui-validatebox textbox" style="width:150px;height:22px;" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            物料ID：
                        </th>
                        <td>
                            <input id="fbominterid" name="fbominterid" class="easyui-validatebox textbox" style="width:150px;height:22px;" />
                        </td>

                        <td colspan="4">
                            <a href="javascript:void(0);" class="easyui-linkbutton" iconcls="icon-search" plain="true"
                               onclick="ui_fitem_searchdata();">搜索</a>
                            <a href="javascript:void(0);" class="easyui-linkbutton" iconcls="icon-clear" plain="true"
                               onclick="ui_fitem_cleardata();">清空条件</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div data-options="region:'center',border:false">
            <table id="ui_fitem_dg" data-options="fit:true,border:false"></table>
        </div>
    </div>

</body>
</html>
